import { DELETE, GET, POST, PUT } from '@/utils/request'

/* 获取轮播图 */
export const getSlide = () => GET('/admin/slideShow', {})
/* 新增轮播图 */
export const postSlide = (data) => POST('/admin/slideShow', data)
/* 更新轮播图 */
export const putSlide = (data) => PUT('/admin/slideShow/' + data.id, data)
/* 删除轮播图 */
export const deleteSlide = (id) => DELETE('/admin/slideShow/' + id, {})

/* 获取活动信息 */
export const getActivity = (params) => GET('/activity', params)
/* 新增活动 */
export const postActivity = (data) => POST('/admin/activity', data)
/* 删除活动 */
export const deleteActivity = (id) => DELETE('/admin/activity/' + id, {})
/* 生成兑换码 */
export const getCDKEY = (params) => GET('/admin/activity/code', params)
/* 获取未兑换的兑换码数量 */
export const getUnuserCDKEY = (id) => GET(`/admin/activity/code/count?activityId=${ id }`, {})

